{*
SPDX-FileCopyrightText: © 2023 Olivier Meunier <olivier@neokraft.net>

SPDX-License-Identifier: AGPL-3.0-only
*}
<div class="grid grid-cols-3 gap-x-4 gap-y-2 max-md:grid-cols-2">
  {{ yield textField(
    field=.Get("search"),
    label="Search",
    class="mb-0 col-span-3 max-md:col-span-2",
  ) }}
  {{ yield textField(
    field=.Get("title"),
    label="Title",
    class="mb-0",
  ) }}
  {{ yield textField(
    field=.Get("author"),
    label="Author",
    class="mb-0",
  ) }}
  {{ yield textField(
    field=.Get("site"),
    label="Site",
    class="mb-0",
  ) }}

  {{ yield textField(
    field=.Get("labels"),
    label="Label",
    class="mb-0",
  ) }}

  <div class="flex flex-wrap gap-x-4">
    {{ yield selectField(field=.Get("is_marked"),
      label="Is Favorite",
      class="mb-0 flex-grow",
      options=slice(slice("", ""), slice(true, "yes"), slice(false, "no")),
    ) }}
    {{ yield selectField(field=.Get("is_archived"),
      label="Is Archived",
      class="mb-0 flex-grow",
      options=slice(slice("", ""), slice(true, "yes"), slice(false, "no")),
    ) }}

    {{ yield selectField(field=.Get("type"),
      label="Type",
      class="mb-0 flex-grow",
    ) }}
  </div>

  <div class="flex flex-wrap gap-x-4">
    {{ yield timeTokenField(
      field=.Get("range_start"),
      label="From date",
      class="mb-0 flex-grow",
    ) }}
    {{ yield timeTokenField(
      field=.Get("range_end"),
      label="To date",
      class="mb-0 flex-grow",
    ) }}
  </div>
</div>
